<template>
	<view class="noData hideToShow" style="background-color: #FFFFFF;">
		<view class="image"><image :src="noDataImg"></image></view>
		<!-- 网络连接失败默认显示内容 -->
		<view class="content" v-if="1">
			<text class="title" style="color: #373a40;">{{ mainText }}</text>
			<text class="desc" style="color: #8b8b8b;">{{ viceText }}</text>
			<!-- #ifdef MP -->
			<button class="btn" type="default" @tap="setting(true)">刷新试试</button>
			<!-- #endif -->
			<!-- #ifdef APP-PLUS -->
			<button class="btn" type="default" @tap="setting(netWorkStatus)">{{ netWorkStatus ? '刷新试试' : '去设置' }}</button>
			<!-- #endif -->
		</view>
		<!-- 自定义内容 -->
		<slot />
	</view>
</template>

<script>
export default {
	data() {
		return {
			type: '',
			netType: this.networkType,
			mainText: '页面走丢了',
			viceText: '别紧张,请联系管理员',
			netWorkImg: '/static/images/huangjin/noNetWork.png',
			noDataImg: '/static/images/huangjin/notFound.png'
		};
	},
	methods: {
		
	}
};
</script>

<style lang="less" scoped>
.noData {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	.image {
		width: 187upx;
		height: 144upx;
		image {
			width: 100%;
			height: 100%;
		}
	}
	.content {
		width: 100%;
		display: flex;
		align-items: center;
		flex-direction: column;
		justify-content: center;
		letter-spacing: 1upx;
		.title {
			font-size: 36upx;
		}
		.desc {
			font-size: 28upx;
			margin-top: 6upx;
		}
		.btn {
			width: 160upx;
			height: 65upx;
			color: #868d91;
			font-size: 24upx;
			margin-top: 34upx;
			border-radius: 36upx;
			border: 1upx solid #d4d4d4;
		}
		.btn::after {
			border: none;
		}
	}
}
</style>
